// components/text/vcard-text-view/index.ts
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    //JOSN对象传值
    data: {
      type: Object,
      value: {}
    },
    userSelect: {
      type: Boolean,
      value: true
    },
    space: {
      type: String,
      value: "emsp"
    },
    nodes: {
      type: String,
      value: "这是一段文字"
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  lifetimes: {
    attached() {
      this.handleData();
    }
  },
  /**
   * 组件的方法列表
   */
  methods: {
    handleData() {
      if (Object.keys(this.properties.data).length>0){
        console.log(this.properties.data);
        console.log({...this.properties,...this.properties.data});
        this.setData({...this.properties,...this.properties.data});
      }
    }
  }
})